package Yi.Servlet;

import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import Entity.Users;
import Yi.DAO.UsersDao;

/**
 * Servlet implementation class IntUserServlet
 */
@WebServlet("/Int_users")
public class IntUserServlet extends HttpServlet {
	private static final long serialVersionUID = 1L;
    private UsersDao usersDAO=new UsersDao();  
    

	/**
	 * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
	 */
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		String uName=request.getParameter("uName");
		Users users=usersDAO.get(uName);
		request.setAttribute("u", users);
		request.getRequestDispatcher("U.jsp").forward(request, response);
	}
}
